# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-crc16
_pkgname=crc16
pkgver=0.1.1
pkgrel=5
pkgdesc='Library for calculating CRC16.'
arch=('x86_64' 'aarch64')
url='http://code.google.com/p/pycrc16'
depends=('python2')
makedepends=('python2-setuptools')
license=('LGPL')
source=("https://pypi.python.org/packages/source/c/$_pkgname/$_pkgname-$pkgver.zip")
sha512sums=('54778e3e041cfbb7801a2eb1c64deb7e52798c6981a0f64983b5be3e3f166b97bde3e6e39f2fbfe4eb0876b8a439c429f01d4ea2181dabb41da64affd884a942')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

